home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crack It!
/
Crack It!.iso
/
CONTENT
/
DISKEDIT
/
PUTCHAR.ASM
< prev
next >
Wrap
Assembly Source File
|
1996-09-09
|
1KB
|
61 lines
;***
;
;PUTCHAR.ASM - a simple routine to quickly plot a character on screen.
; Output is raw, i.e. no control character processing is done.
;(C)Copyright Gerard Paul Java 1996
;
;***
.MODEL TPASCAL
.DATA
EXTRN TextAttr: BYTE
EXTRN CheckSnow: BYTE
.CODE
PUBLIC PutChar
PutChar PROC FAR X: BYTE,Y: BYTE, Character: BYTE
XOR AH,AH
MOV AL,160
MOV DH,Y
MOV DL,X
ADD DH,3
ADD DL,2
MUL DH
XOR DH,DH
ADD AX,DX
ADD AX,DX
MOV DI,AX
MOV AH,0FH
INT 10H
CMP AL,7
JE MONO
MOV AX,0B800H
JMP MOVCHAR
MONO: MOV CheckSnow,0
MOV AX,0B000H
MOVCHAR: MOV ES,AX
MOV AL,Character
MOV AH,TextAttr
CMP CheckSnow,1
JNE STORECHAR
MOV BX,AX
MOV DX,3DAH
WAIT1: IN AL,DX
RCR AL,1
JC WAIT1
CLI
WAIT2: IN AL,DX
RCR AL,1
JNC WAIT2
MOV AX,BX
STORECHAR: STOSW
RET
PutChar ENDP
END